import service from '@/utils/request'

export const getSysButtonList = (params) => {
  return service({
    url: '/sysButton/getSysButtonList',
    method: 'get',
    params
  })
}

export const findSysButton = (params) => {
  return service({
    url: '/sysButton/findSysButton',
    method: 'get',
    params
  })
}

export const createSysButton = (data) => {
  return service({
    url: '/sysButton/createSysButton',
    method: 'post',
    data
  })
}

export const updateSysButton = (data) => {
  return service({
    url: '/sysButton/updateSysButton',
    method: 'put',
    data
  })
}

export const deleteSysButton = (data) => {
  return service({
    url: '/sysButton/deleteSysButton',
    method: 'delete',
    data
  })
}

export const getButtonByAutorityId = (data) => {
  return service({
    url: '/sysButton/getButtonByAutorityId',
    method: 'post',
    data
  })
}

export const addButtonAuthority = (data) => {
  return service({
    url: '/sysButton/addButtonAuthority',
    method: 'post',
    data
  })
}

export const getAllButtons = (data) => {
  return service({
    url: '/sysButton/getAllButtons',
    method: 'post',
    data
  })
}
